Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
"Too many text segments" error in Google translate API

I am working in Angular-12. In our system, we are using "Google Translate" API.

So when we try to translate strings in bulk, then API returns the error

 {
  "error": {
    "code": 400,
    "message": "Too many text segments",
    "errors": [
      {
        "message": "Too many text segments",
        "domain": "global",
        "reason": "invalid"
      }
    ]
  }
}

This is the type of data we are sending in API,

API which we are using https://translation.googleapis.com/language/translate/v2?key=Alza.......

 {
        "source":"en",
        "target":"es",
        "q":["string1", "string1",......]
    }

Any kind of help is appritiable, thank you.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As mentioned in this documentation, the total number of strings (segments) that can be sent for translation per request is limited to 128. If the number of segments sent for translation exceeds 128, the error "Too many text segments" will be thrown by the API. Quoting the mentioned documentation:

The maximum number of strings is 128.

As an alternative, Cloud Translation Advanced can be used. It offers higher limits on the number of strings that can be sent for translation. Cloud Translation Advanced also provides support for glossaries, batch requests, and AutoML models. A comparison between the Basic and Advanced versions of the Translation API can be found here.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda